package com.gtenacg.cartoonservice.service.impl;

import com.gtenacg.cartoonservice.mapper.RelationNovelAuthorMapper;
import com.gtenacg.cartoonservice.pojo.model.RelationNovelAuthor;
import com.gtenacg.cartoonservice.service.RelationNovelAuthorService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 86198
* @description 针对表【gt_relation_novel_author(小说作者联系表)】的数据库操作Service实现
* @createDate 2024-05-22 08:46:33
*/
@Service
@RequiredArgsConstructor
public class RelationNovelAuthorServiceImpl implements RelationNovelAuthorService{
    private final RelationNovelAuthorMapper relationAuthorMapper;

    @Override
    public List<RelationNovelAuthor> list() {
        return relationAuthorMapper.list();
    }

    @Override
    public List<RelationNovelAuthor> search(Integer nid, Integer aid) {
        return relationAuthorMapper.search(nid, aid);
    }

    @Override
    public List<RelationNovelAuthor> getByNids(List<Integer> nids) {
        return relationAuthorMapper.getByNids(nids);
    }

    @Override
    public Integer insert(RelationNovelAuthor relationNovelAuthor) {
        relationAuthorMapper.insert(relationNovelAuthor);
        return relationNovelAuthor.getRnaid();
    }

    @Override
    public void update(RelationNovelAuthor relationNovelAuthor) {
        relationAuthorMapper.update(relationNovelAuthor);
    }

    @Override
    public void delete(List<Integer> ids) {
        relationAuthorMapper.delete(ids);
    }
}




